Allow chained references of custom environment variables to all generated envs#2905
Allow chained references of custom environment variables to all generated envs#2905siegenthalerroger wants to merge 3 commits intozalando:masterfrom
Conversation
|
@sdudoladov @Jan-M @FxKu @jopadi @idanovinda @hughcapet @macedigital any chance for a review/merge? |
|
How would you override the WAL_BUCKET_SCOPE_SUFFIX/PREFIX with values from config map or secret. This is the reason why they are added before. |
|
@FxKu That is true, that is no longer possible with this approach. If that is a requirement then there would need to be a change in Spilo to make sure the behaviour on Azure is the same as on AWS & GCS (the S3 upload path interpolation is different for WAL-E and WAL-G iirc, it's been a while tbh). An alternative solution would be to add a new "operator" env variable that contains the cluster UID, opening up the possibility for using that for interpolation wherever one could want (regardless of what the operator or spilo defaults to). I thought I read that this was unlikely to be merged but can't find that anymore. What do you think? |
Fixes #2227
Currently custom environment variables are added after most generated envs but notably before
WAL_BUCKET_SCOPE_SUFFIXand_PREFIX. This means that referencing one of these values from a custom env is impossible (k8s has an implied ordering of env vars).I have changed this to always have custom envs being at the end of the list while still respecting the overrideability of only certain envs. It is now possible to use WAL-E with Azure Storage Accounts while including the UID of the cluster in the backup path.
tldr: Works now, didn't before